#ifndef SOLUTION_H
#define SOLUTION_H

#include "mazegenerator.h"
#include <QObject>
#include <QVector>
#include <QPoint>
#include <QDebug>

struct Node {
    QPoint xy;
    int val;
    Node * next;

    Node(QPoint _xy, int _val) : xy(_xy), val(_val),next(NULL) {}
};

// struct MazeData {
//     QVector<QVector<int>> maze;
//     QPoint start;
//     QPoint end;
// };

class Switch : public QObject
{
    Q_OBJECT
public:
    explicit Switch(QObject *parent = nullptr);

    ~Switch();
    void switchPhase(const MazeData &mazeData);
    void get_b();
    void get_e();
    void reset_visited();


    QVector<int> record;



};
extern QVector<Node*> hnode;
extern QVector<int> visited;
extern int begin;
extern int ending;
#endif // SOLUTION_H
